/**
 * Project Name:fastPlat
 * File Name:SiteMsg.java
 * Package Name:com.fast.cms.model.article
 * Date:2015年3月14日下午11:11:02
 * Copyright (c) 2015, lsflu@126.com All Rights Reserved.
 *
 */

package com.fast.cms.model.article;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * ClassName:SiteMsg <br/>
 * 用途: 站内信 <br/>
 * 开发人员：lushuifa http://lushuifa.iteye.com/ 邮箱:lsflu@126.com
 * 
 * @version
 * @since JDK 1.6
 * @see Date: 2015年3月14日 下午11:11:02 <br/>
 */
@Entity
@Table(name = "T_cms_SiteMsg")
@DynamicInsert(true)
@DynamicUpdate(true)
@Commnent("站内信")
public class SiteMsg implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// =========================head===================================
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id = 0;
	private String uuid = "";//唯一ID
	// =========================body===================================
	private String title = "";//信息标题
	private String msgType = "";//信息类型
	private String msgTypeUUID = "";//信息类型UUID
	private String sendObject = "";
	private String reciveAdminArr = "";//企业内部人员
	private String reciceMemberArr = "";//网站会员
	@Column(length = 5000)
	private String readMemberArr = "";//已读人员
	private String smsContent = "";//短信内容
	@Column(length = 5000000)
	private String msgDetail = "";// 信息详情
	private int isSms = 0;// 是否发短信 1代表发送 只针对有手机号的用户发送
	private int isSend = 0;// 短信是否发送成功      只针对有邮箱的用户发送
	private int isEmail = 0;// 是否发邮件 1代表发送
	private int isRead = 0;// 未阅读
	private int readCount = 0;// 阅读次数
	private String allreadMan = "";// 已阅读人员  
	private int isShouChan = 0;// 是否收藏 1代表收藏
	private int isSendImm=0;// 是否立刻发送 0代表立即发送出去，1代表预约发送
	private String sendDate = "";  //发送时间
	private int sendStatus = 0;//发送状态 1代表未发送
	
	// =========================foot===================================
	// 操作信息
	@Commnent("编辑人ID")
	@Column(name = "editor_id", length = 11)
	private int editorId = 0;// 编辑人Id
	@Commnent("编辑人")
	@Column(name = "editor_name", length = 32)
	private String editorName = "";// 编辑人
	@Commnent("编辑时间")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "edit_time")
	private Date editTime;// 编辑时间
	@Commnent("创建人ID")
	@Column(name = "creater_id", length = 11)
	private int createrId = 0;// 编辑人Id
	@Commnent("创建人")
	@Column(name = "creater", length = 32)
	private String creater = "";// 编辑人
	@Commnent("创建时间")
	@Column(name = "create_time", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Commnent("删除标识")
	@Column(name = "delete_flag", length = 1)
	private int deleteFlag = 0;// 默认为不删除，1为删除
	
	public SiteMsg() {
	}

	public SiteMsg(String title, String msgType,String reciveAdminArr, String msgDetail) {
		super();
		this.title = title;
		this.reciveAdminArr = reciveAdminArr;
		this.msgDetail = msgDetail;
		this.createTime = new Date();
		this.creater = "系统管理员";
		this.editorName = "系统管理员";
		this.editTime = new Date();
		this.msgType = msgType;
		this.msgTypeUUID = "zdy001";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getReciveAdminArr() {
		return reciveAdminArr;
	}

	public void setReciveAdminArr(String reciveAdminArr) {
		this.reciveAdminArr = reciveAdminArr;
	}

	public String getReciceMemberArr() {
		return reciceMemberArr;
	}

	public void setReciceMemberArr(String reciceMemberArr) {
		this.reciceMemberArr = reciceMemberArr;
	}

	public int getIsSms() {
		return isSms;
	}

	public void setIsSms(int isSms) {
		this.isSms = isSms;
	}

	public int getIsSend() {
		return isSend;
	}

	public void setIsSend(int isSend) {
		this.isSend = isSend;
	}

	public String getSmsContent() {
		return smsContent;
	}

	public void setSmsContent(String smsContent) {
		this.smsContent = smsContent;
	}

	public int getIsEmail() {
		return isEmail;
	}

	public void setIsEmail(int isEmail) {
		this.isEmail = isEmail;
	}

	public int getIsRead() {
		return isRead;
	}

	public void setIsRead(int isRead) {
		this.isRead = isRead;
	}

	public int getReadCount() {
		return readCount;
	}

	public void setReadCount(int readCount) {
		this.readCount = readCount;
	}

	public String getAllreadMan() {
		return allreadMan;
	}

	public void setAllreadMan(String allreadMan) {
		this.allreadMan = allreadMan;
	}

	public String getMsgDetail() {
		return msgDetail;
	}

	public void setMsgDetail(String msgDetail) {
		this.msgDetail = msgDetail;
	}

	public int getIsShouChan() {
		return isShouChan;
	}

	public void setIsShouChan(int isShouChan) {
		this.isShouChan = isShouChan;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")  public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getIsSendImm() {
		return isSendImm;
	}

	public void setIsSendImm(int isSendImm) {
		this.isSendImm = isSendImm;
	}

	public String getSendDate() {
		return sendDate;
	}

	public void setSendDate(String sendDate) {
		this.sendDate = sendDate;
	}

	public int getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(int sendStatus) {
		this.sendStatus = sendStatus;
	}

	public String getSendObject() {
		return sendObject;
	}

	public void setSendObject(String sendObject) {
		this.sendObject = sendObject;
	}

	public String getReadMemberArr() {
		return readMemberArr;
	}

	public void setReadMemberArr(String readMemberArr) {
		this.readMemberArr = readMemberArr;
	}

	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}

	public String getMsgTypeUUID() {
		return msgTypeUUID;
	}

	public void setMsgTypeUUID(String msgTypeUUID) {
		this.msgTypeUUID = msgTypeUUID;
	}

	@Override
	public String toString() {
		return "SiteMsg [id=" + id + ", uuid=" + uuid + ", title=" + title + ", msgType=" + msgType + ", msgTypeUUID="
				+ msgTypeUUID + ", sendObject=" + sendObject + ", reciveAdminArr=" + reciveAdminArr
				+ ", reciceMemberArr=" + reciceMemberArr + ", readMemberArr=" + readMemberArr + ", smsContent="
				+ smsContent + ", msgDetail=" + msgDetail + ", isSms=" + isSms + ", isSend=" + isSend + ", isEmail="
				+ isEmail + ", isRead=" + isRead + ", readCount=" + readCount + ", allreadMan=" + allreadMan
				+ ", isShouChan=" + isShouChan + ", isSendImm=" + isSendImm + ", sendDate=" + sendDate + ", sendStatus="
				+ sendStatus + ", editorId=" + editorId + ", editorName=" + editorName + ", editTime=" + editTime
				+ ", createrId=" + createrId + ", creater=" + creater + ", createTime=" + createTime + ", deleteFlag="
				+ deleteFlag + "]";
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
}
